<!DOCTYPE html>
<html>
<head>
	<title>录入快递 -- 快件e栈服务平台</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	
	<link href="../css/normalize.css" type="text/css" rel="stylesheet" />
	<link href="../css/common.css" type="text/css" rel="stylesheet" />
	<script src="js/jquery.min.js" type="text/javascript"></script>
	<script src="js/common.js" type="text/javascript"></script>
	<script src="js/notice.js" type="text/javascript"></script>
	<script src="js/regexp.js" type="text/javascript"></script>
	<script src="js/jweixin-1.2.0.js" type="text/javascript"></script>
	<script src="/layer/layer.js"></script>
	<style type="text/css">
		.content{
			position: relative;
		}
		.expEnterCont{
			padding-bottom: 20px;
		}
		.expEnterCont .expEnterIcon{
			width: 20%;
			margin: 0 auto;
		}
		.expEnterCont .expEnterIcon p{
			text-align: center;
			font-weight: bold;
		}

		.submitBtn{
			width: 100%;
			margin: 0 auto;
			text-align: center;
			line-height: 46px;
			border-radius: 23px;
			background: #1f72ff;
			color: #fff;
			font-weight: bolder;
		}
		
		.stopvoicerecord{
			width: 40%; 
			height: 50px;
			position: absolute;
			top: 20px;
			right: 40px;
			display: none;
			background:purple;
		}
		
		.stopvoicerecord{
			position: absolute;
			top: 0%;
			left: 0%;
			width: 100%;
			height: 100%;
			background-color: rgba(0,0,0,0.5);
			z-index: 1001;
			display: none;
		}
		.stopvoicerecord .voiceRecordCont{
			width: 60%; 
			background: #fff;
			border-radius: 8px;
			position: absolute;
			top: calc((100% - 216px) / 2);  /*30 + 110 +30 + 10 +36 == 216*/
			left: 20%;
			padding: 20px 0px 10px;
		}
		.stopvoicerecord .voiceRecordCont img{
			display: block;
			margin: 0 auto;
			width: 110px;
		}
		.stopvoicerecord .voiceRecordCont .voiceRecordState{
			margin: 0px;
			text-align: center;
			font-size: 14px;
			color: #777777;
			line-height: 30px;
		}
		.stopvoicerecord .voiceRecordCont #stopVoiceRecordBtn{
			margin: 10px auto 0px;
			width: 90%; 
			text-align: center;
			line-height: 36px;
			background: #3eb94e;
			font-size: 14px;
			color: #fff;
			font-weight: bold;
			border-radius: 18px;
		}
	</style>
</head>
<body>
<div class="content">
	<div class="headerNav">
		<div class="headerNavTop"><div class="headerNavIcon headerNavIconOut"><span></span><span></span></div></div>
		<div class="headerNavCont">
			<a href="index.html">快递首页</a>
			<a href="userhome.html">个人中心</a>
			<a href="delivery.html">送货上门</a>
			<a href="sendexpress.html">我要寄件</a>
			<a href="../lazyboard.html">懒人排行</a>
			<a href="expassistant.html">快递助手</a>
		</div>
	</div>

	<div class="expEnterCont">
		<div class="expEnterIcon">
			<img src="../images/expentericon.png" width="100%">
			<p>录入快递</p>
		</div>
		<div class="expEnterInput">
<!--				<input id="timestamp" type="hidden" value="${timestamp}" />-->
<!--				<input id="noncestr" type="hidden" value="${nonceStr}" />-->
<!--				<input id="signature" type="hidden" value="${signature}" />-->
<!--				<input id="appId" type="hidden" value="${appId}" />-->
			<form id="iForm" method="post" target="iframe">
<!--				<input id="PageContext" type="hidden" value="${pageContext.request.contextPath}" />-->
<!--				<input id="wxCode" type="hidden" value="${wxCode}" />-->
				<div class="userInputCont">
					<div class="inputTypeCont">
						<div class="inputTitle">单号</div>
						<input type="text" id="expressId" class="commonInputFunc" name="expressId" placeholder="请输入快递单号(6位数字不能以0打头)">
					</div>
					<div class="inputTypeCont">
						<div class="inputTitle">姓名</div>
						<input type="text" id="username" class="commonInputFunc" name="phone" placeholder="请输入收件人姓名(1-32位有效字符)">
					</div>
					<div class="inputTypeCont">
						<div class="inputTitle">手机</div>
						<input type="text" id="phone" class="commonInputFunc" name="phone" placeholder="录入后短信自动提醒">
					</div>
					<div class="inputTypeCont">
						<div class="inputTitle">公司</div>
						<select id="company" name="company">
							<option>安能快递</option>
							<option>安能物流</option>
							<option>澳大利亚邮政</option>
							<option>阿根廷邮政</option>
							<option>爱沙尼亚邮政</option>
							<option>阿联酋邮政</option>
							<option>奥地利邮政</option>
							<option>阿尔巴尼亚邮政</option>
							<option>Aramex</option>
							<option>巴西邮政</option>
							<option>比利时邮政</option>
							<option>百世快运</option>
							<option>波兰邮政</option>
							<option>白俄罗斯邮政</option>
							<option>保加利亚邮政</option>
							<option>巴基斯坦邮政</option>
							<option>百福东方</option>
							<option>包裹信件</option>
							<option>晟邦物流</option>
							<option>城市100</option>
							<option>City-Link</option>
							<option>COE</option>
							<option>传喜物流</option>
							<option>德邦快递</option>
							<option>大田物流</option>
							<option>递四方</option>
							<option>DHL德国</option>
							<option>DHL全球</option>
							<option>DHL中国</option>
							<option>EMS</option>
							<option>EMS国际</option>
							<option>EMS经济快递</option>
							<option>FedEx中国</option>
							<option>FedEx国际</option>
							<option>FedEx美国</option>
							<option>飞豹快递</option>
							<option>凡宇快递</option>
							<option>飞远配送</option>
							<option>飞远(爱彼西)</option>
							<option>法国邮政</option>
							<option>芬兰邮政</option>
							<option>国通快递</option>
							<option>postco</option>
							<option>百世快递</option>
							<option>恒路物流</option>
							<option>黄马甲配送</option>
							<option>黑猫宅急便</option>
							<option>华企快运</option>
							<option>韩国邮政</option>
							<option>佳吉快运</option>
							<option>京东快递</option>
							<option>佳怡物流</option>
							<option>京广速递</option>
							<option>日本邮政</option>
							<option>筋斗云物流</option>
							<option>捷克邮政</option>
							<option>嘉里大通</option>
							<option>加运美</option>
							<option>快捷快递</option>
							<option>跨越速运</option>
							<option>克罗地亚邮政</option>
							<option>联昊通</option>
							<option>龙邦速递</option>
							<option>黎巴嫩邮政</option>
							<option>民航快递</option>
							<option>秘鲁邮政</option>
							<option>毛里求斯邮政</option>
							<option>马耳他邮政</option>
							<option>摩尔多瓦邮政</option>
							<option>马其顿邮政</option>
							<option>民邦快递</option>
							<option>明亮物流</option>
							<option>挪威邮政</option>
							<option>南非邮政</option>
							<option>OnTrac</option>
							<option>葡萄牙邮政</option>
							<option>全峰快递</option>
							<option>全一快递</option>
							<option>如风达</option>
							<option>申通快递</option>
							<option selected="selected">顺丰速运</option>
							<option>速尔快递</option>
							<option>盛丰物流</option>
							<option>圣安物流</option>
							<option>盛辉物流</option>
							<option>瑞士邮政</option>
							<option>苏宁快递</option>
							<option>斯洛伐克邮政</option>
							<option>沙特邮政</option>
							<option>斯洛文尼亚邮政</option>
							<option>塞尔维亚邮政</option>
							<option>天天快递</option>
							<option>天地华宇</option>
							<option>土耳其邮政</option>
							<option>泰国邮政</option>
							<option>TNT</option>
							<option>UPS</option>
							<option>USPS</option>
							<option>万象物流</option>
							<option>乌克兰邮政</option>
							<option>万家物流</option>
							<option>信丰物流</option>
							<option>新邦物流</option>
							<option>西班牙邮政</option>
							<option>匈牙利邮政</option>
							<option>圆通速递</option>
							<option>韵达快递</option>
							<option>优速物流</option>
							<option>银捷速递</option>
							<option>远成物流</option>
							<option>运通中港快递</option>
							<option>邮政国内小包</option>
							<option>英国皇家邮政</option>
							<option>意大利邮政</option>
							<option>印度邮政</option>
							<option>亚美尼亚邮政</option>
							<option>越丰物流</option>
							<option>亚风速递</option>
							<option>邮政国际包裹</option>
							<option>中通快递</option>
							<option>宅急送</option>
							<option>中铁物流</option>
							<option>增益速递</option>
							<option>中铁快运</option>
							<option>芝麻开门</option>
							<option>中国邮政</option>
							<option>智利邮政</option>
							<option>中速快递</option>
						</select>
					</div>
				</div>
				<input type="submit" class="submitBtn" id="btn" value="录入信息">
				<input type="reset" class="submitBtn" value="重置" onclick="resetData()">
			</form>
<!--			<div class="submitBtn">录入信息</div>-->
			<iframe id="iframe" name="iframe" style="display:none;"></iframe>
		</div>
	</div>
</div>
<script>
	function resetData() {
		$("input:eq(0)").val("");
		$("input:eq(1)").val("");
		$("input:eq(2)").val("");
		$("#company").val("顺丰速递");
	}
</script>
<script type="text/javascript">
	$(function () {
		$("#iForm").submit(function () {
			var windowId = layer.load();
			var number = $.trim($("input:eq(0)").val());
			if (number === "") {
				layer.close(windowId);
				layer.msg("单号不能为空！");
				$("input:eq(0)").focus();//选中
				return;
			}
			var username = $.trim($("input:eq(1)").val());
			if (username === "") {
				layer.close(windowId);
				layer.msg("收件人姓名不能为空！");
				$("input:eq(1)").focus();//选中
				return;
			}
			var userPhone = $.trim($("input:eq(2)").val());
			if (userPhone === "") {
				layer.close(windowId);
				layer.msg("手机号码不能为空！");
				$("input:eq(2)").focus();//选中
				return;
			}
			var company = $.trim($("#company").val());
			$.post("/wx/insert.do", {
				number: number,
				company: company,
				username: username,
				userPhone: userPhone
			}, function (data) {
				layer.close(windowId);
				layer.msg(data.content);
				if (data.status === 0) {
					resetData();
				}
			}, "JSON");
			return false;
		});
		$("input:eq(0)").blur(function () {
			var str = $(this).val();
			if (str.trim() === "") {
				layer.msg("单号不能为空！");
				$(this).focus();//选中
				$(this).select();//全选
				$("#btn").prop("disabled", true);
			}else {
				if (str.match(/^[1-9][0-9]{5}$/) === null) {
					layer.msg("单号不合法！");
					$(this).focus();//选中
					$(this).select();//全选
					$("#btn").prop("disabled", true);
				}else {
					$("#btn").prop("disabled", false);
				}
			}
		});
		$("input:eq(1)").blur(function () {
			var str = $(this).val();
			if (str.trim() === "") {
				layer.msg("收件人姓名不能为空！");
				$(this).focus();//选中input输入框
				$(this).select();//全选input输入框内输入内容
				$("#btn").prop("disabled", true);
			}else {
				if (str.match(/^[\u4e00-\u9fff\w]{1,32}$/) === null) {
					layer.msg("收件人姓名不合法！");
					$(this).focus();//选中input输入框
					$(this).select();//全选input输入框内输入内容
					$("#btn").prop("disabled", true);
				}else {
					$("#btn").prop("disabled", false);
				}
			}
		});
		$("input:eq(2)").blur(function () {
			var str = $(this).val();
			if (str.trim() === "") {
				layer.msg("手机号码不能为空！");
				$(this).focus();//选中input输入框
				$(this).select();//全选input输入框内输入内容
				$("#btn").prop("disabled", true);
			}else {
				if (str.match(/^1[3-9]\d{9}$/) === null) {
					layer.msg("请输入正确的手机号码！");
					$(this).focus();//选中input输入框
					$(this).select();//全选input输入框内输入内容
					$("#btn").prop("disabled", true);
				}else {
					$("#btn").prop("disabled", false);
				}
			}
		});
	});
</script>
</body>
</html>